package com.atguigu.realtime.gmallpublisher.service;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.Map;

/**
 * @Author lzc
 * @Date 2020/12/8 9:32
 */
public interface PublisherService {
    //从es中查询当日总的日活
    Long getTotalDau(String date) throws IOException;

    // Map("10"->1000, "11"->2000)
    Map<String, Long> getHourDau(String date) throws IOException;


    BigDecimal getOrderAmount(String date);

    // =>   Map["10"->111.11, ...]
    Map<String, BigDecimal> getHourOrderAmount(String date);
}

/*
List<Map>
    ┌─create_hour─┬─total_amount─┐
    │ 03          │    341512.00 │
    │ 01          │    391006.00 │
    │ 07          │    764666.00 │
    └─────────────┴──────────────┘
=>   Map["10"->111.11, ...]
 */